package org.yhhhhhhh.ai_jianli.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.yhhhhhhh.ai_jianli.model.User;

import java.util.List;
import java.util.Optional;

public interface UserRepository extends JpaRepository<User, Long> {
    Optional<User> findByUsername(String username);
    boolean existsByUsername(String username);
    boolean existsByEmail(String email);
    List<User> findAll();
    Optional<User> findById(Long id);
    void deleteById(Long id);
    List<User> findByUsernameContainingIgnoreCase(String keyword);
}